#pragma once

#define NEED_LOAD_LOG_MODULE 1

#include "singletonTemplate.h"
#include "ISysLog.h"

// using namespace ICTSysLog;

typedef void (*LPLog)(int nLogType, const wchar_t* const lpszFormat, ...);
typedef ISysLog* (*LPGetLogInstance)();

class CLogWrapper
{
	friend class CSingleton<CLogWrapper>;

protected:

	CLogWrapper();
	CLogWrapper(const CLogWrapper&);
	CLogWrapper& operator=(const CLogWrapper&);
	virtual ~CLogWrapper();

public:

	bool Initialize();
	
public:

	ISysLog* GetLogInterface()
	{
		return m_pSysLog;
	}
	virtual void Log(int nLogType, const wchar_t* const lpszFormat, ...);
	void LogEvent(){};


protected:

	HMODULE		m_hModule;
	LPLog		m_log;
	ISysLog*	m_pSysLog;

	LPGetLogInstance m_getLogInstance;	
};